
include('shared.lua')

local matBall = Material( "Effects/fire_cloud2" )
/*---------------------------------------------------------
   Name: Initialize
---------------------------------------------------------*/
function ENT:Initialize()
	
		self.Color = Color( 255, 255, 255, 255 )
	
end


/*---------------------------------------------------------
   Name: DrawPre
---------------------------------------------------------*/
function ENT:Draw()
	
	local pos = self.Entity:GetPos() + Vector(0,0,8)
	local vel = self.Entity:GetVelocity()
	local lcolor = render.GetLightColor( pos ) * 2
	lcolor.x = self.Color.r * mathx.Clamp( lcolor.x, 0, 1 )
	lcolor.y = self.Color.g * mathx.Clamp( lcolor.y, 0, 1 )
	lcolor.z = self.Color.b * mathx.Clamp( lcolor.z, 0, 1 )
	render.SetMaterial( matBall )
	local col = Color( lcolor.x, lcolor.y, lcolor.z, 255 )
	render.DrawSprite( pos, 32, 32, col )
end

 